import requests

# 接口配置
url = "https://xhx.kaike.la/goproxy"
headers = {
    "Content-Type": "application/json",
    "xhxtoken": "00002771_13cd36f38c065dec73dfde2123444bbc229"  # 假设token放在请求头中
}


def remove_member(memberIds):
    """移除单个成员"""
    payload = {
        "service_name": "nkomarket.ProjectMemberProvider.RemoveMember",
        "param": {
            "projectId": 10888,
            "memberIds": memberIds  # 修正：memberIds应为数组类型
        }
    }

    # 修正：token应放在请求头而非cookies中
    response = requests.post(url, json=payload, headers=headers)
    print(response.json())
    # 打印请求信息（调试用）
    print(f"Request URL: {response.request.url}")
    print(f"Status Code: {response.status_code}")
    print(f"Request Headers: {response.request.headers}")
    print(f"Request Body: {response.request.body.decode('utf-8')}")




memberIds = [
"202506180141281716",
"202506180167286981",
"202506180138238439",
"202506180117269624",
"202506180184950716",
"202506180151931739",
"202506180158472470",
"202506180127500184",
"202506180147122378",
"202506180118266210"
]

# 单个移除
remove_member(memberIds)
# 执行批量移除
# batch_remove_members(project_id, member_ids)